<%@page import="com.xhd.vo.Yixiang"%>
<%@page import="java.util.Iterator"%>
<%@page import="com.xhd.vo.Fruits"%>
<%@page import="java.util.List"%>
<%@page import="com.xhd.Dao.SalerDaoImpl"%>
<%@page import="com.xhd.Dao.SalerDao"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<meta http-equiv="content-type" content="text/html;charset=utf-8">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<style type="text/css">
	* {
		font-size: 11pt;
	}
	div {
		border: solid 2px rgb(78,78,78);
		width: 75px;
		height: 75px;
		text-align: center;
	}
	li {
		margin: 10px;
	}
</style>
<body>
<c:if test="${ not empty sessionScope.user}">
<h1>历史信息</h1>
	<% 
	SalerDao sd = new SalerDaoImpl();
	List<Yixiang> yixianglist=sd.showYixiang();
	Iterator<Yixiang> YIter1=yixianglist.iterator();
	Yixiang fruit=null;
	%>
<table border="1" width="100%" cellspacing="0" background="black">
		<tr bgcolor="rgb(78,78,78)" bordercolor="rgb(78,78,78)" align="center" style="color: white;">
		<th>名称</th>
		<th>电话号码</th>
		<th>水果</th>	
		<th>地址</th>
		<th>交易方式</th>
		<th>所在省</th>
		<th>所在市</th>
		<th>所在区</th>
		</tr>
	<% 
	while(YIter1.hasNext()){
		fruit=YIter1.next();
	%>	
		<tr bordercolor="rgb(78,78,78)" align="center">
		<td><%=fruit.getName() %></td>
		<td><%=fruit.getPhonenum() %></td>
		<td><%=fruit.getFruit() %></td>
		<td><%=fruit.getAddress() %></td>
		<td><%=fruit.getJiaoyifangshi() %></td>
		<td><%=fruit.getSheng() %></td>
		<td><%=fruit.getShi() %></td>
		<td><%=fruit.getQu() %></td>
		</tr>
	<%
	}
	%>
	</table>
</c:if>
<c:if test="${  empty sessionScope.user}">
<h1>你还未登录！</h1>
<a href="SalerLogin.jsp">点击登录</a>
</c:if>
</body>
</html>